class CreateClients < ActiveRecord::Migration
  def self.up
    create_table :clients do |t|
    t.column :client_group_id, :integer
    t.column :client_since , :date, :default => Time.now
    t.column :status, :string
    t.column :salutation, :string
    t.column :first_name, :string
    t.column :middle_name, :string
    t.column :laat_name, :string
    t.column :fathers_salutation, :string
    t.column :fathers_first_name, :string
    t.column :fathers_middle_name, :string
    t.column :fathers_laat_name, :string
    t.column :husbands_salutation, :string
    t.column :husbands_first_name, :string
    t.column :husbands_middle_name, :string
    t.column :husbands_laat_name, :string
    t.column :gender, :string
    t.column :married, :boolean, :default => false  
    t.column :date_of_birth, :date
    t.column :date_of_marriage, :date
    t.column :office_add_same_as_client, :boolean, :default => false
    t.column :residential_add_same_as_client, :boolean, :default => false
    t.column :same_residential_office_address, :boolean, :default => false 
    t.column :office_add_1, :string
    t.column :office_add_2, :string
    t.column :office_city, :string
    t.column :office_state, :string
    t.column :office_pin, :integer
    t.column :residential_add_1, :string
    t.column :residential_add_2, :string
    t.column :residential_city, :string
    t.column :residential_state, :string
    t.column :residential_pin, :integer
    
    
    t.column :firm_name, :string
    t.column :date_of_incorporation, :date
    t.column :authorized_person_salutation, :string
    t.column :authorized_person_first_name, :string
    t.column :authorized_person_midle_name, :string
    t.column :authorized_person_laat_name, :string
    t.column :authorized_person_dezignation, :string   
    
    t.column :pan   , :string
    t.column :tan   , :string
    t.column :industry, :string
    t.column :it_ward_juridiction, :string
    t.column :it_ward_middle, :string
    t.column :it_ward_code, :string
    t.column :bank, :string
    t.column :bank_account_type, :string
    t.column :bank_account_no, :string
    end
  end

  def self.down
    drop_table :clients
  end
end
